﻿using Betfair.Api.Types;

namespace Betfair.Api
{
    public class Response
    {
        public Response(ResponseType responseType = ResponseType.OK, string error = "")
        {
            ResponseType = responseType;
            Error = error;
        }

        public ResponseType ResponseType { get; private set; }
        public string Error { get; private set; }
    }

    public sealed class Response<T> : Response
    {
        public Response(ResponseType responseType = ResponseType.OK, T result = default (T), string error = "")
            : base(responseType, error)
        {
            Result = result;
        }

        public T Result { get; private set; }
    }
}